gtk4.git
9 years agoUpdated Kazakh translation
Baurzhan Muftakhidinov [Tue, 17 May 2016 10:18:52 +0000 (10:18 +0000)]
Updated Kazakh translation
(cherry picked from commit d1585a7a60d760a0c98934f970c4403023a399c3)

9 years agoscrolledwindow: Fix typo in get_preferred_height calculation
Debarshi Ray [Mon, 16 May 2016 19:13:14 +0000 (21:13 +0200)]
scrolledwindow: Fix typo in get_preferred_height calculation

When we are beginning to calculate the height, if the vscrollbar_policy
is not GTK_POLICY_NEVER, and there is no min-content-height, then we
need some small non-zero value to get started. The idea is to always
ask for at least enough to fit the horizontal scrollbar.

Simply put, this should be the mirror image of the corresponding width
calculation code.

Those who got used to the buggy behaviour might notice that their
GtkScrolledWindows are not as tall as they used to be.

Fall out from 55196a705f00564a44647bfc97981db0a783369a

https://bugzilla.gnome.org/show_bug.cgi?id=766530

9 years agostack: always update window position at transition start
Matt Watson [Fri, 13 May 2016 07:22:20 +0000 (00:22 -0700)]
stack: always update window position at transition start

Sometimes on wayland we're seeing a frame draw before the first tick
callback, where the window position has not yet been updated.

With this change, the window is properly positioned as soon as
gtk_stack_start_transition returns.

https://bugzilla.gnome.org/show_bug.cgi?id=766405

9 years agoUse upstream gettext
Javier Jardón [Sat, 9 Jan 2016 18:35:34 +0000 (18:35 +0000)]
Use upstream gettext

https://bugzilla.gnome.org/show_bug.cgi?id=373745

9 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 16 May 2016 15:13:24 +0000 (17:13 +0200)]
Updated Spanish translation

9 years agoUpdated Portuguese translation
Tiago Santos [Sun, 15 May 2016 21:40:45 +0000 (21:40 +0000)]
Updated Portuguese translation

9 years agoUpdated Portuguese translation
Tiago Santos [Sun, 15 May 2016 21:22:46 +0000 (21:22 +0000)]
Updated Portuguese translation

9 years agoscale: Avoid a crash
Matthias Clasen [Sun, 15 May 2016 18:18:09 +0000 (14:18 -0400)]
scale: Avoid a crash

gtk_scale_get_layout was not careful enough, leading to a crash
when opening the inspector on a scale.

9 years agowidget: fix GtkLabelAccessible NULL links.
Alban Browaeys [Sat, 14 May 2016 21:57:28 +0000 (23:57 +0200)]
widget: fix GtkLabelAccessible NULL links.

Fix testsuite/a11y/about.ui GtkAboutDialog :
"CRITICAL **: atk_hyperlink_get_start_index: assertion 'ATK_IS_HYPERLINK (link)' failed"
That is set widget->priv->accessible as soon as accessible object is generated.

When accessible object is created accessible->priv->widget is set,
if widget->priv->accessible is not , then _gtk_label_accessible_update_links
exits early, thus without creating the links on the accessible side.
(This as it checks for the widget to have the accessible set before proceeding).

https://bugzilla.gnome.org/show_bug.cgi?id=766458

9 years agowidget: No longer postpone style-updated on unrealized widgets
Benjamin Otte [Sat, 14 May 2016 16:35:27 +0000 (18:35 +0200)]
widget: No longer postpone style-updated on unrealized widgets

GTK used to not emit GtkWidget::style-updated on widgets that weren't
realized. This sped up construction of complex widgetry in the early
days of GTK3 where we instantly invalidated on every change.
We don't do that anymore, so in theory (and in my limited testing with
widget-factory) this shouldn't be a prolem anymore.

What is a problem though is that postponing style-updated leads to 2
problems:
(1) Unrealized widgets will not emit style-updated which may cause them
    to not properly update their state and return wrong values from
    get_preferred_width/height() etc
(2) Emitting style-updated during realize can happen too late.
    When a widget is not made child-visible by its parent (common
    examples: notebook, paned) it will also not be realized when the
    parent is initially shown. However, when they get realized later
    (after a resize of the parent), they will emit style-updated (and
    potentially queue a resize) during size-allocate.

https://bugzilla.gnome.org/show_bug.cgi?id=765700

9 years agoscrolledwindow: destroy children in destroy()
Benjamin Otte [Sat, 14 May 2016 15:13:52 +0000 (17:13 +0200)]
scrolledwindow: destroy children in destroy()

If we don't do that, testsuite/gtk/templates starts failing.

9 years agogdkwindow: Use GList less
Timm Bäder [Sat, 30 Apr 2016 16:46:22 +0000 (18:46 +0200)]
gdkwindow: Use GList less

9 years agoquery-settings: Indicate deprecated settings
Timm Bäder [Sat, 30 Apr 2016 10:10:14 +0000 (12:10 +0200)]
query-settings: Indicate deprecated settings

9 years agostack: Don't underallocate the last_child
Timm Bäder [Fri, 26 Feb 2016 20:58:36 +0000 (21:58 +0100)]
stack: Don't underallocate the last_child

9 years agostack: Remove some code duplication
Timm Bäder [Fri, 26 Feb 2016 20:58:22 +0000 (21:58 +0100)]
stack: Remove some code duplication

9 years agoRemove useless casts from gdk_event_triggers_context_menu calls
Timm Bäder [Mon, 18 Apr 2016 18:48:53 +0000 (20:48 +0200)]
Remove useless casts from gdk_event_triggers_context_menu calls

9 years agoquery-settings: Don't compare int to uint
Timm Bäder [Sat, 16 Apr 2016 11:57:32 +0000 (13:57 +0200)]
query-settings: Don't compare int to uint

9 years agolistbox: Don't compare int to uint
Timm Bäder [Sat, 16 Apr 2016 11:57:08 +0000 (13:57 +0200)]
listbox: Don't compare int to uint

9 years agocolorbutton: Stop using state-changed
Timm Bäder [Wed, 11 May 2016 13:33:18 +0000 (15:33 +0200)]
colorbutton: Stop using state-changed

9 years agotoolbar: Limit item position to number of contained elements
Timm Bäder [Tue, 10 May 2016 17:16:19 +0000 (19:16 +0200)]
toolbar: Limit item position to number of contained elements

Greater values don't make much sense.

https://bugzilla.gnome.org/show_bug.cgi?id=682080

9 years agowayland: Avoid unitialized memory reads
Matthias Clasen [Thu, 12 May 2016 15:37:13 +0000 (11:37 -0400)]
wayland: Avoid unitialized memory reads

I didn't pay attention when I replaced g_new0 with g_newa. Oops.

9 years agoAdwaita: brighter pushed button background
Lapo Calamandrei [Thu, 12 May 2016 09:50:13 +0000 (11:50 +0200)]
Adwaita: brighter pushed button background

providing more contrast with the text color.

9 years agoAdwaita: bold size label on font button
Lapo Calamandrei [Thu, 12 May 2016 09:45:34 +0000 (11:45 +0200)]
Adwaita: bold size label on font button

looks more consistent with other special buttons with icons.

9 years agoAdwaita: hide separator on button.font and button.file
Lapo Calamandrei [Thu, 12 May 2016 09:40:28 +0000 (11:40 +0200)]
Adwaita: hide separator on button.font and button.file

we used to do that, got missed at some point during 3.20 cycle.

9 years agoDocs: Clarify life cycle issue
Matthias Clasen [Wed, 11 May 2016 17:25:15 +0000 (13:25 -0400)]
Docs: Clarify life cycle issue

gtk_gesture_get_last_event() wasn't very clear about how long
it is safe to use the returned pointer.

9 years agoDND: Avoid a use-after-free
Matthias Clasen [Wed, 11 May 2016 17:24:04 +0000 (13:24 -0400)]
DND: Avoid a use-after-free

Cancelling the gesture causes the last_event pointer to become
invalid. Make a copy of the event so we can keep using it
regardless of the gesture state.

9 years agoplaces sidebar: Avoid markup confusion in tooltips
Matthias Clasen [Wed, 11 May 2016 01:47:20 +0000 (21:47 -0400)]
places sidebar: Avoid markup confusion in tooltips

At one point, the sidebar was using gtk_treeview_set_tooltip_column,
which expects tooltips to be markup. With the listbox-based sidebar,
we don't do that anymore. So don't escape the tooltip text.

https://bugzilla.gnome.org/show_bug.cgi?id=766175

9 years agox11: Trap possible X error
Matthias Clasen [Wed, 11 May 2016 01:29:10 +0000 (21:29 -0400)]
x11: Trap possible X error

XIGetClientPointer can generate X errors (e.g. when the X server
does not support XI2. Trap them and carry on.

https://bugzilla.gnome.org/show_bug.cgi?id=766233

9 years agoFix scale length
Matthias Clasen [Tue, 10 May 2016 19:41:03 +0000 (15:41 -0400)]
Fix scale length

The vertical scales should really be of the same length, so
add an empty value to be drawn by the other scale.

9 years agoForgotten rename
Matthias Clasen [Tue, 10 May 2016 19:31:29 +0000 (15:31 -0400)]
Forgotten rename

9 years agoScale: Set the correct value alignment
Timm Bäder [Tue, 10 May 2016 16:33:37 +0000 (18:33 +0200)]
Scale: Set the correct value alignment

We're measuring both the width of the minimal and the maximal value for
the value gadget, but only give the value the minimal width for its
current value, resultnig in an always left-aligned value.

Fix this by assigning the width of the value gadget to the value layout
and letting pango align the text inside the layout.

https://bugzilla.gnome.org/show_bug.cgi?id=766120

9 years agowidget-factory: Let one of the scales draw a value
Timm Bäder [Mon, 9 May 2016 16:30:14 +0000 (18:30 +0200)]
widget-factory: Let one of the scales draw a value

https://bugzilla.gnome.org/show_bug.cgi?id=766120

9 years agoDocument new api
Matthias Clasen [Tue, 10 May 2016 19:22:35 +0000 (15:22 -0400)]
Document new api

9 years agoMake gdk_event_get_pointer_emulated public
Matthias Clasen [Tue, 10 May 2016 19:16:45 +0000 (15:16 -0400)]
Make gdk_event_get_pointer_emulated public

There is not strong reason to keep the getter private.
At the same time, strip _-prefixes from a few other GdkEvent
APIs. Update all callers.

9 years agogtkmenu: ignore left/right scroll events
Olivier Fourdan [Mon, 9 May 2016 06:56:56 +0000 (08:56 +0200)]
gtkmenu: ignore left/right scroll events

Menus are placed vertically by definition, it does not make much sense
to support horizontal axis for scrolling.

Use GDK_EVENT_STOP/GDK_EVENT_PROPAGATE instead of TRUE/FALSE and add a
default case to return GDK_EVENT_PROPAGATE for unhandled events.

https://bugzilla.gnome.org/show_bug.cgi?id=765939

9 years agogtkmenu: ignore emulated scroll events
Olivier Fourdan [Tue, 3 May 2016 14:44:14 +0000 (16:44 +0200)]
gtkmenu: ignore emulated scroll events

On X11, we get both smooth and emulated scroll events, whereas other
backends such as wayland will give smooth events only with touchpad
scrolling.

Discard emulated scroll events so that we get consistent behaviours
between backends.

Allow for both horizontal and vertical smooth events for scrolling so
that horizontal scrolling still works without emulated scroll events as
well, again for consistency between gdk backends.

https://bugzilla.gnome.org/show_bug.cgi?id=765939

9 years agogdkevent: make _gdk_event_get_pointer_emulated() private
Olivier Fourdan [Tue, 3 May 2016 14:15:07 +0000 (16:15 +0200)]
gdkevent: make _gdk_event_get_pointer_emulated() private

And not just internal to gdk, so we can use it in gtk as well, to
differentiate emulated scroll events from others.

https://bugzilla.gnome.org/show_bug.cgi?id=765939

9 years agoscale: Remove double nullable annotation
Timm Bäder [Tue, 10 May 2016 10:50:42 +0000 (12:50 +0200)]
scale: Remove double nullable annotation

Being both (allow-none) and (nullable) at the same time is a bit much.
Was from 591e7f5ef8538982e227b2c2cefc536a33cafa6c.

9 years agowidget: Add Since annotation to gtk_widget_queue_allocate
Timm Bäder [Tue, 10 May 2016 10:31:56 +0000 (12:31 +0200)]
widget: Add Since annotation to gtk_widget_queue_allocate

9 years agoGTK: Fix build for pre-C99 compilers
Chun-wei Fan [Mon, 9 May 2016 08:37:39 +0000 (16:37 +0800)]
GTK: Fix build for pre-C99 compilers

Some compilers we support, such as pre-2013 Visual Studio, does not support
for INIFINITY, log2() and exp2(), so check for exp2() and log2() during
configure, and use fallbacks for them and INIFINTY if they are not found.

https://bugzilla.gnome.org/show_bug.cgi?id=766207

9 years agoVisual Studio builds: Refine "installation" process
Chun-wei Fan [Tue, 10 May 2016 05:18:23 +0000 (13:18 +0800)]
Visual Studio builds: Refine "installation" process

Split out the part where we generate/update the caches for the GSchemas
and the icons, so that it is easier to ensure that things continue to
function correctly when we have GlibEtcInstallRoot != CopyDir.

9 years agoscrolledwindow: Remove child before destroying self
Benjamin Otte [Mon, 9 May 2016 22:59:19 +0000 (00:59 +0200)]
scrolledwindow: Remove child before destroying self

Children tend to call back into the scrolled window while being removed
and that doesn't work too well if the scrolled window is destroyed
already as Christian Hergert found out.

9 years agocssimage: Make it possible to shrink builtin check/optionmarks
Benjamin Otte [Mon, 9 May 2016 22:58:50 +0000 (00:58 +0200)]
cssimage: Make it possible to shrink builtin check/optionmarks

... below 7px of size.

9 years agoUpdated Occitan translation
Cédric Valmary [Mon, 9 May 2016 20:49:18 +0000 (20:49 +0000)]
Updated Occitan translation

9 years agodocs: Update examples of matching key bindings
Emmanuele Bassi [Mon, 9 May 2016 11:45:34 +0000 (12:45 +0100)]
docs: Update examples of matching key bindings

The selector for matching GtkEntry has changed to `entry` after 3.20.

https://bugzilla.gnome.org/show_bug.cgi?id=766166

9 years agogdk/Makefile.am: Dist gdkmonitorprivate.h
Chun-wei Fan [Mon, 9 May 2016 07:42:37 +0000 (15:42 +0800)]
gdk/Makefile.am: Dist gdkmonitorprivate.h

This file needs to be distributed with the tarball as well...

9 years agoVisual Studio builds: Clean up projects a bit
Chun-wei Fan [Mon, 9 May 2016 07:35:26 +0000 (15:35 +0800)]
Visual Studio builds: Clean up projects a bit

Consolidate the .lib's that we need to link to for GDK and GTK+ into the
property sheets, and also link to setupapi.lib as that is needed by
the port to the new GdkMonitor API.

9 years agogdk/win32/gdkmonitor-win32.c: Fix build on non-GCC
Chun-wei Fan [Mon, 9 May 2016 05:14:01 +0000 (13:14 +0800)]
gdk/win32/gdkmonitor-win32.c: Fix build on non-GCC

WINBOOL is MinGW-specific, so change it to BOOL, which is universally
available.

Also, Visua Studio is more picky on where __stdcall (WINAPI) is placed, so
fix that to be in-sync with what is done in the other sources.

9 years agoplacesview: update guiding list of protocols
Georges Basile Stavracas Neto [Sun, 8 May 2016 20:36:26 +0000 (17:36 -0300)]
placesview: update guiding list of protocols

The previous list of protocols in the guidance popover
was suboptimal and needed adjustments.

This commit updates this list to match the latest mockups [1].

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/4847c79ea1aaf75046b3ec5bb1b167ac604d86ed/nautilus/nautilus-next/connect-to-server-wire.png

https://bugzilla.gnome.org/show_bug.cgi?id=756570

9 years agodialogs: remove 2px border width again
Timm Bäder [Sun, 8 May 2016 19:33:53 +0000 (21:33 +0200)]
dialogs: remove 2px border width again

9 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 8 May 2016 15:30:49 +0000 (18:30 +0300)]
Updated Lithuanian translation

9 years agoUpdated Brazilian Portuguese translation
Rafael Fontenelle [Sun, 8 May 2016 14:25:31 +0000 (14:25 +0000)]
Updated Brazilian Portuguese translation
(cherry picked from commit 207b793316a90faff00d5ea6fbe483d5a184d066)

9 years agotooltip: Include gtkwidgetprivate.h
Timm Bäder [Sun, 8 May 2016 13:52:56 +0000 (15:52 +0200)]
tooltip: Include gtkwidgetprivate.h

That's where gtk_widget_query_tooltip is defined.

9 years agogdk: Fix parameter name mismatch
Timm Bäder [Sun, 8 May 2016 13:34:28 +0000 (15:34 +0200)]
gdk: Fix parameter name mismatch

9 years agoinfobar: Fix typo
Timm Bäder [Mon, 2 May 2016 06:59:40 +0000 (08:59 +0200)]
infobar: Fix typo

Style class names are prefixed with a '.'

9 years agogtk-demo: Fix revealer demo
Matthias Clasen [Sat, 7 May 2016 20:22:13 +0000 (16:22 -0400)]
gtk-demo: Fix revealer demo

This only used by luck before. We are changing a property from the
::notify handler for that property. Now that GtkRevealer is notifying
the property when it stops animations on unmap, we end up in a life
lock situation where we never make it out of the notify queue.

Fix this by not restarting the animation if the widget is unmapped.

9 years agowidget: add missing detail to ::query-tooltip emission
Ray Strode [Sat, 7 May 2016 02:29:31 +0000 (22:29 -0400)]
widget: add missing detail to ::query-tooltip emission

This was an oversight in commit dfb368e29bb58b4313b578f0ce75cfc8ead9a1.

9 years agotooltip: Add a missing *
Matthias Clasen [Sat, 7 May 2016 00:51:25 +0000 (20:51 -0400)]
tooltip: Add a missing *

This was an oversight in the previous commit.

9 years agogtk3-demo: Add a close button to the markup window
Matthias Clasen [Sat, 7 May 2016 00:50:38 +0000 (20:50 -0400)]
gtk3-demo: Add a close button to the markup window

9 years agogtk-demo: Don't duplicate text in markup example
Matthias Clasen [Sat, 7 May 2016 00:47:49 +0000 (20:47 -0400)]
gtk-demo: Don't duplicate text in markup example

I forgot to clear the buffer before inserting the new markup. Oops.

9 years agorevealer: emit notify::child-revealed when animation stops
Matthieu Gautier [Wed, 4 May 2016 10:42:40 +0000 (12:42 +0200)]
revealer: emit notify::child-revealed when animation stops

Depending of float rounding during target calculation, the size of the
GtkRevealer can be set to zero will the animation is not finished.
If the GtkRevealer is in a GtkPaned, it will be hidden and so the animation
will be stopped before it is finished.

In this case, force the emission of the child-revealed signal to let
client code know the animation is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=765973

9 years agoSimplify our templates
Matthias Clasen [Fri, 6 May 2016 17:45:46 +0000 (13:45 -0400)]
Simplify our templates

This is applying the new property name simplification.

9 years agoClean up builder parser data after parsing
Matthias Clasen [Fri, 6 May 2016 17:45:09 +0000 (13:45 -0400)]
Clean up builder parser data after parsing

No need to have these linger around in qdata.

9 years agobuilder tool: Canonicalize property names
Matthias Clasen [Fri, 6 May 2016 17:42:30 +0000 (13:42 -0400)]
builder tool: Canonicalize property names

When simplifying, convert property names to canonical form,
so we don't waste time while looking them up later.

9 years agoUpdated Occitan translation
Cédric Valmary [Fri, 6 May 2016 18:31:42 +0000 (18:31 +0000)]
Updated Occitan translation

9 years agoAdwaita: darken treeview exapanders
Lapo Calamandrei [Fri, 6 May 2016 17:34:12 +0000 (19:34 +0200)]
Adwaita: darken treeview exapanders

9 years agoAdwaita: cosmetic change
Lapo Calamandrei [Fri, 6 May 2016 17:01:19 +0000 (19:01 +0200)]
Adwaita: cosmetic change

9 years agoAdwaita: relocate a selector
Lapo Calamandrei [Fri, 6 May 2016 16:50:37 +0000 (18:50 +0200)]
Adwaita: relocate a selector

relocate treview acceleditor > label in the treeview section and
add a comment for a testcase.

9 years agoAvoid emitting ::style-set by name
Matthias Clasen [Fri, 6 May 2016 14:12:14 +0000 (10:12 -0400)]
Avoid emitting ::style-set by name

GtkStyle is deprecated, but we still emit ::style-set quite
a bit, so lets at least not be slow while doing it.

9 years agoDon't emit ::query-tooltip by name
Matthias Clasen [Fri, 6 May 2016 13:54:24 +0000 (09:54 -0400)]
Don't emit ::query-tooltip by name

This signal is emitted quite a bit, and we can easily avoid it.

9 years agoStop storing has-tooltip in qdata
Matthias Clasen [Fri, 6 May 2016 13:38:18 +0000 (09:38 -0400)]
Stop storing has-tooltip in qdata

This is queried quite a bit, and we have room for an extra
bit in GtkWidgetPrivate.

9 years agoDon't use qdata for getting the default css style
Matthias Clasen [Fri, 6 May 2016 11:54:22 +0000 (07:54 -0400)]
Don't use qdata for getting the default css style

There's no point in using qdata for looking this up, since
we only ever set it on the default screen anyway.

9 years agoAdwaita: tidy treeview style properties...
Lapo Calamandrei [Fri, 6 May 2016 13:36:26 +0000 (15:36 +0200)]
Adwaita: tidy treeview style properties...

...removing a double definition in the process.

9 years agosettings: Fix font names *again*
Matthias Clasen [Fri, 6 May 2016 11:08:56 +0000 (07:08 -0400)]
settings: Fix font names *again*

This is the last time, I hope.

9 years agowidget: Store accessible in GtkWidgetPrivate
Matthias Clasen [Fri, 6 May 2016 10:42:43 +0000 (06:42 -0400)]
widget: Store accessible in GtkWidgetPrivate

Every widget may have one of these, and they are accessed somewhat
frequently.

9 years agoEnsure we initialize a quark first
Matthias Clasen [Fri, 6 May 2016 04:46:17 +0000 (00:46 -0400)]
Ensure we initialize a quark first

The style function here can also be called before the corresponding
class_init had a chance to create the quark. Fix this.

9 years agotooltip: Ensure our quark is not 0
Matthias Clasen [Fri, 6 May 2016 04:45:05 +0000 (00:45 -0400)]
tooltip: Ensure our quark is not 0

Many of the tooltip functions can be called before a tooltip
object is created, and thus initializing the quark in class_init
is not good enough.

9 years agoUse a cheaper way to store settings per display
Matthias Clasen [Fri, 6 May 2016 04:21:08 +0000 (00:21 -0400)]
Use a cheaper way to store settings per display

This was another very frequent use of qdata. Since we typically
have only one or two display objects, storing the display-settings
association in a simple array is faster than using object data
or a hash table.

9 years agoUse a cheaper way to store debug flags
Matthias Clasen [Thu, 5 May 2016 22:51:30 +0000 (18:51 -0400)]
Use a cheaper way to store debug flags

This was the most frequent use of qdata *by far*.

9 years agoFix indentation mishap
Matthias Clasen [Thu, 5 May 2016 23:21:27 +0000 (19:21 -0400)]
Fix indentation mishap

9 years agoFix a typo
Matthias Clasen [Thu, 5 May 2016 23:17:31 +0000 (19:17 -0400)]
Fix a typo

9 years agowayland: use g_signal_handler_disconnect()
Christian Hergert [Fri, 6 May 2016 08:31:41 +0000 (11:31 +0300)]
wayland: use g_signal_handler_disconnect()

Use of g_signal_handlers_disconnect_by_func() needs to do more work than
necessary to find all the matching handlers. Instead, just hold on to the
signal identifier and remove it directly so we hit the fast path.

Not terribly ground breaking in terms of performance gains, but its done
enough to be worthwhile.

https://bugzilla.gnome.org/show_bug.cgi?id=766049

9 years agoUpdate color name css style test
Matthias Clasen [Thu, 5 May 2016 19:37:21 +0000 (15:37 -0400)]
Update color name css style test

Verify rebeccapurple too.

9 years agoscale: Fix mark positioning at the left/top edge
Matthias Clasen [Thu, 5 May 2016 19:17:56 +0000 (15:17 -0400)]
scale: Fix mark positioning at the left/top edge

We were failing to take the widget allocation.x/y into account
when deciding whether we need to push in the mark.

https://bugzilla.gnome.org/show_bug.cgi?id=765922

9 years agoGeneralize the previous commit
Matthias Clasen [Thu, 5 May 2016 18:13:03 +0000 (14:13 -0400)]
Generalize the previous commit

Update all xsettings when we get a screen, to prevent similar
problems from occurring in the future.

9 years agosettings: Avoid a crash
Matthias Clasen [Thu, 5 May 2016 17:30:55 +0000 (13:30 -0400)]
settings: Avoid a crash

Christian Hergert reported seeing webkit crashes with recent
GTK+. The stacktrace points at the CSS machinery calling into
GtkSettings to get the font name, and then getting surprised
by a property notification that triggers style validation.

To avoid this, query the font name xsetting right away when
we get set a screen.

9 years agox11: Rely on passive keyboard grabs with XI2 for DnD
Carlos Garnacho [Thu, 5 May 2016 17:00:28 +0000 (19:00 +0200)]
x11: Rely on passive keyboard grabs with XI2 for DnD

The active keyboard grab can be spared then. This way the passive
key grabs allow other key combinations (eg. alt-tab) that are not
mandatory to grab here.

9 years agoAdwaita: more flexible headerbar_fill mixin
Lapo Calamandrei [Thu, 5 May 2016 16:36:03 +0000 (18:36 +0200)]
Adwaita: more flexible headerbar_fill mixin

add an additional background layer as a parameter.

9 years agosearchenginetracker: Quote fts match so it's seen as a single phrase
Carlos Garnacho [Wed, 4 May 2016 12:23:17 +0000 (14:23 +0200)]
searchenginetracker: Quote fts match so it's seen as a single phrase

FTS5 has a complex enough syntax that it makes not much sense to wrap
in simple search boxes.

https://bugzilla.gnome.org/show_bug.cgi?id=765981

9 years agolabel: Also initialize text
Timm Bäder [Thu, 5 May 2016 09:21:56 +0000 (11:21 +0200)]
label: Also initialize text

So gtk_label_get_text returns the default value of "". Broke the
GtkModelButton default value test.

9 years agocssgadget: Remove unused function
Timm Bäder [Thu, 5 May 2016 06:47:40 +0000 (08:47 +0200)]
cssgadget: Remove unused function

9 years agogtkrender: Remove superfluous cairo_save/restore calls
Timm Bäder [Wed, 4 May 2016 20:24:52 +0000 (22:24 +0200)]
gtkrender: Remove superfluous cairo_save/restore calls

These were all surrounding functions that either call
cairo_save/cairo_restore themselves or don't need to.

9 years agocss node: Stop extraneous change notification
Matthias Clasen [Wed, 4 May 2016 20:05:40 +0000 (16:05 -0400)]
css node: Stop extraneous change notification

The ::name and ::widget-type properties are entirely independent,
no need to notify both when either changes.

9 years agobox: Only emit ::child-notify when necessary
Matthias Clasen [Wed, 4 May 2016 19:05:08 +0000 (15:05 -0400)]
box: Only emit ::child-notify when necessary

We can easily check if the values for expand, padding and so forth
actually changed, so lets do it.

9 years agoRevert "When creating a widget path, use the widget type"
Matthias Clasen [Wed, 4 May 2016 17:52:09 +0000 (13:52 -0400)]
Revert "When creating a widget path, use the widget type"

This reverts commit 0d78b67bca8866a05d0d55d3d5c48aa7a90ff89e.

As Benjamin points out: that'll break all widgets that query style
properties in their init function.

9 years agoWhen creating a widget path, use the widget type
Matthias Clasen [Wed, 4 May 2016 17:41:05 +0000 (13:41 -0400)]
When creating a widget path, use the widget type

No need to pull the type out of the css node - its our own type.
This will let us stop setting the type on the css node later on.

9 years agoSet the proper state on the css node
Matthias Clasen [Wed, 4 May 2016 17:38:47 +0000 (13:38 -0400)]
Set the proper state on the css node

This will almost certainly overwritten before the widget gets
to the screen, but while we are doing this, we might as well
use the same state that we initialize the widgets state to.

9 years agocss names are always set
Matthias Clasen [Wed, 4 May 2016 16:48:46 +0000 (12:48 -0400)]
css names are always set

No need to check for it, we set the css name on GtkWidgetClass
ourselves.

9 years agoswitch: Remove .slider from slider gadget
Timm Bäder [Wed, 4 May 2016 16:55:33 +0000 (18:55 +0200)]
switch: Remove .slider from slider gadget

As the documentation states, neither the switch nor the slider gadget
should be using any style classes.

9 years agoswitch: Create less pango layouts
Timm Bäder [Wed, 4 May 2016 13:25:59 +0000 (15:25 +0200)]
switch: Create less pango layouts

Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.